<%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../common/global.jsp" %>
<%@ page import="com.cndatacom.ccsinfoMgr.model.*"%> 
<%@page import="com.cndatacom.eweb.common.FileUpload"%>
<%
	String ctx = request.getContextPath(); 
	
	String attachment = "";//附件相对路径
	String attachName = "";//附件名称
	if(request.getAttribute("bylawInfo") != null) {
		if(((BylawInfo)request.getAttribute("bylawInfo")).getAttachment() != null) {
			attachment = ((BylawInfo)request.getAttribute("bylawInfo")).getAttachment();
			attachName = attachment.substring((attachment.lastIndexOf("/")+1));
		}
	}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>新建规章制度</title>
<link rel="stylesheet" type="text/css" href="<%=ctx%>/infoMgr/css/main.css"/>
<link rel="stylesheet" type="text/css" href="<%=ctx%>/infoMgr/dropdown-menu/style.css"/>
<link href="<%=ctx%>/common/css/upload-component.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=ctx%>/js/upload.js"></script>
<script type="text/javascript" src="<%=ctx%>/js/submitFunctions.js"></script>
<script type="text/javascript" src="<%=ctx%>/infoMgr/dropdown-menu/script.js"></script>
<script type="text/javascript" src="<%=ctx%>/ckeditor/ckeditor.js"></script>
<script>
	function validData() {
		document.getElementById("random").value = document.getElementById("randomfolder").value;
		document.getElementById("title").value = document.getElementById("showtitle").value;
		var title = document.getElementById("title").value;
		if(title == "") {
			alert("标题不能为空！")
			return false;
		}
		document.getElementById("pubForm").submit();
	}
	
	function formReset() {//Form重置
		pubForm.reset();
		document.getElementById("showtitle").value = document.getElementById("title").value;
	}
</script>
</head>
<body onload="initAttach('<%=attachment%>','<%=attachName%>')">
<!--主体内容开始-->
<div class="warp">
  <!--页头开始-->
  <%request.setAttribute("panel","index");%>
  <%request.setAttribute("conpanel","rules");%>
  <%@include file="../common/include/panel.jsp" %>
  <!--页头结束-->
  <!--内容开始-->
  <div class="insidecontent">
    <%@include file="../common/include/conpanel.jsp" %>
    <div class="formlist">
    <div class="bread">当前位置：<a href="#">首页</a> >> <a href="#">新建规章制度</a></div>
    
      <table border="0" cellspacing="2" cellpadding="0" class="formT formF">
        <tr>
          <td class="Tlable">标题：</td>
          <td><input type="text" class="formText" id="showtitle" value="${bylawInfo.title}"></td>
        </tr>
        <upload:load></upload:load>
<form name="pubForm" id="pubForm" action="bylawinfo-edit.action" method="post">
    <input type="hidden" name="bylawInfo.id" value="${bylawInfo.id}">
    <input type="hidden" name="bylawInfo.title" id="title" value="${bylawInfo.title}">
    <input type="hidden" name="random" id="random">
    <input type="hidden" id="attachnum" name="attachnum" value="1">
    <input type="hidden" name="allowType" id="allowtype" value="">        
        <tr>
        <td></td>
        <td>               
        	<div class="Sresult"><textarea cols="80" id="content" name="bylawInfo.content">${bylawInfo.content}</textarea></div>
		</td>
		<script type="text/javascript">  
      		CKEDITOR.replace('content');   //content为textarea的id
		</script>
        </tr>
</form>
    	<tr>
        	<td class="Tlable"></td>
          	<td class="btSubmit"><button id="saveBnt" class="formBt" onclick="validData()">发布</button><button id="resetBnt" class="formBt" onclick="formReset()">重置</button></td>
        </tr>
      </table>
    
    
    </div>
    <!--内容结束-->
  </div>
    <!--页脚开始-->
    <div class="footer"><span>Copyright© 2009-2010 中国通信服务股份有限公司 版权所有</span></div>
    <!--页脚结束-->
</div>
<!--主体内容结束-->
<script type="text/javascript">
	var menu=new menu.dd("menu");
	menu.init("menu","menuhover");
</script>
</body>
</html>